<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "short_message".
 *
 * @property int $id
 * @property string $mobile
 * @property string $codes
 * @property int $send_time
 * @property string $content
 * @property int $status
 * @property int $is_use 0未使用 1已使用
 * @property int $code_type 1 会员审核  2 经纪人注册 3修改密码 4经纪人修改手机
 * @property int $create_time
 */
class ShortMessage extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'short_message';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['mobile', 'codes', 'content', 'status', 'code_type', 'create_time'], 'required'],
            [['send_time', 'status', 'is_use', 'code_type', 'create_time'], 'integer'],
            [['mobile'], 'string', 'max' => 11],
            [['codes'], 'string', 'max' => 32],
            [['content'], 'string', 'max' => 64],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'mobile' => 'Mobile',
            'codes' => 'Codes',
            'send_time' => 'Send Time',
            'content' => 'Content',
            'status' => 'Status',
            'is_use' => 'Is Use',
            'code_type' => 'Code Type',
            'create_time' => 'Create Time',
        ];
    }
}
